﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using Konekcija.Core.Reporting.Dto.Application.Files;

namespace Konekcija.Core.Reporting.Mappings.Files
{
    public class DocumentLanguageMap : ClassMap<DocumentLanguage>
    {
        public DocumentLanguageMap()
        {
            Schema("files");
            Table("DocumentLanguages");

            Id(x => x.Id).GeneratedBy.GuidComb().Not.Nullable();
            Map(x => x.DocumentId).Column("DocumentId")
                .Not.Insert().Not.Update().Nullable();
            Map(x => x.LanguageId).Nullable();
            Map(x => x.Title).Nullable();
            Map(x => x.Description).Nullable();
            Map(x => x.DateCreated).Nullable();
            Map(x => x.DateChanged).Nullable();
            Map(x => x.ByUserId).Nullable();

            References(x => x.Document).Nullable();
        }
    }
}
